package com.itlhc.service;

import com.github.pagehelper.PageInfo;
import com.itlhc.pojo.Books;
import com.itlhc.pojo.Page;
import com.itlhc.pojo.User;
import org.apache.ibatis.annotations.Param;


import java.util.List;

//BookService:底下需要去实现,调用dao层
public interface BookService {
    //增加一个Book
    int addBook(Books book);
    //根据id删除一个Book
    int deleteBookById(int id);
    //更新Book
    int updateBook(Books books);
    //根据id查询,返回一个Book
    Books queryBookById(int id);
    //查询全部Book,返回list集合
    List<Books> queryAllBook();
    //分页查询
    List<Books> findPages(@Param(value = "startPos") Integer startPos, @Param(value = "pageSize") Integer pageSize) throws Exception;
    //查询总记录数
    Integer getGoodsCount(int id);
    //分页查询文章列表
    public PageInfo<Books> selectBooksPage(Integer page, Integer count);
}